Flash memory devices, which include arrays of Flash memory cells, are used in many applications for storing digital information. Flash memory is frequently used in portable electronic devices, digital cameras, personal computers, memory cards, and other types of devices. Due to the nature of these devices, the endurance, speed, and longevity of the Flash memory are important.
Flash memory devices may store data in arrays of Flash memory cells, including single-level and/or multi-level cells. A single level cell (SLC) flash memory stores one bit of information per cell, typically by programming and reading a binary charge (e.g., high or low charge). In contrast, multi-level cells (MLC) store multiple bits of information in each cell by programming and reading a level of charge in the cell. Multi-level cells may include cells that store two bits (MLCx2), three bits (MLCx3), N bits (MLCxN), etc. Flash memory cells are organized into blocks within the array, and the blocks may be arranged by block type into flash memory arrays, or populations of block types.
The majority of blocks in a Flash memory device are usable blocks, or good blocks. However, inevitably, every Flash device includes non-functional blocks, commonly referred to as bad blocks, which may be incapable of being erased or rewritten with new information for any number of reasons. Typically, a Flash memory device may include some bad blocks at the beginning of the life of the device, and the number of bad blocks typically increases during the lifetime of the device. Flash memory blocks can become bad from any number of reasons. For example, each block of flash memory is limited in the number of times the data therein can be programmed and erased, characterized by a maximum program/erase (P/E) cycle. Thus, if a block of the Flash memory has been programmed and erased a number of times exceeding the P/E cycle maximum, it may turn bad. Flash memory blocks may also become bad blocks by erase failure, or other causes.
In most instances, the capacity of a memory card or other device using Flash memory (referred to generally as a Flash device) must be guaranteed during a rated lifetime of the device. The Flash device capacity may be directly limited by the number of usable blocks available to store data. Therefore, in order to ensure that the card capacity is maintained throughout the rated lifetime of the Flash device, a system designer may allocate a certain amount of usable blocks in a spare pool to allow switching of good spare blocks instead of bad used blocks during usage. Maintaining a pool of spare blocks from which good blocks may be drawn upon in exchange for bad blocks allows a requisite number of usable blocks to be ensured throughout the life of the device.
In MLC flash memory devices, memory blocks may be used as different types, for example SLC, MLCx2, MLCx3 blocks, etc., each of which may have different reliability specifications. Due to the differing reliability specifications of each data block type, a designer may allocate different numbers of spare blocks associated with each block type.
FIG. 1 illustrates a Flash memory device with a known method of allocating and using spare blocks. A spare block pool of single level cells (an SLC spare block pool) exchanges blocks exclusively with an SLC used block pool. A spare block pool of multi-level cells (a MLC spare block pool) exchanges blocks exclusively with a main user mapped memory of used MLC blocks. Bad blocks are exchanged for spare blocks, and the flash memory device can no longer write information to the bad blocks. The pools are set at the start of the life of the flash memory device. Since the usage of each data type is unknown, the maximum spare blocks are typically allocated to each of the SLC spare block pool and the MLC spare block pool. The solution in this case is however sub-optimal because at the end of the lifetime of the memory device, some of the spare blocks from either the SLC spare block pool or MLC spare block pool will typically not be used.
However, the rate of deterioration may be different for the different block types, such that when a spare block pool of one type is depleted, the memory device may reach the end of its usable life, even though there may be spare blocks of other types remaining. For example, at a certain point in the life of the device, there may be too few usable SLC blocks to maintain the specified flash memory card capacity while a surplus of MLC block types remain. The lifetime of the device will therefore end while usable MLC spare blocks are still available. Consequently, all of the flash memory blocks will be sub-optimally exploited during the lifespan of the device.
A similar problem arises when handling caching and buffering for the flash memory write operation or when executing the static and dynamic wear leveling processes. Buffer and cache operations and static and dynamic wear leveling processes may both require use of spare blocks. A problem may arise when there are too few good blocks of one of the block populations, e.g., SLC, MLC, to allocate for buffering and caching, or for static and dynamic wear leveling.
For the foregoing reasons, there is a need for a flash memory method that ensures optimal usage of all blocks throughout the life of the flash memory device and increases longer flash memory device lifespan.